(define "NumCaptureDone" (value Player Mover)) (define "Sow" (move Select (from (sites Mover) if:(> (count at:(from)) 0) ) (then (sow #1 if:(or { (and {(<= (count at:(to)) 9) (is Odd (count at:(to))) (>= "NumCaptureDone" ) }) // Two or more captures done so far (and ("IsOffBoard" "NumCaptureDone") (= (count at:(to)) )) // No capture done so far. // Only one capture done so far. }) apply:(fromTo (from (to)) (to (mapEntry (mover))) count:(count at:(to)) // We update the number of capture done so far for that player. (then (and (if (= "NumCaptureDone" 1) (set Value Mover 2)) (if ("IsOffBoard" "NumCaptureDone") (set Value Mover 1)) ) ) ) origin:True ) ) ) ) (define "PiecesOwnedBy" (+ (count at:(mapEntry #1)) (count in:(sites #1)))) //------------------------------------------------------------------------------ (game "Ako Okwe" (players 2) (equipment { (mancalaBoard 2 5 { (track "TrackCCW" "1,E,N,W" loop:True) (track "TrackCW" "6,E,S,W" loop:True) } ) (regions P1 (sites Bottom)) // P1 home (regions P2 (sites Top)) // P2 home (map {(pair P1 FirstSite) (pair P2 LastSite)}) // kalahs (storage pits) (piece "Seed" Shared) }) (rules (start (set Count 10 to:(sites Track))) (play (or ("Sow" "TrackCW") ("Sow" "TrackCCW"))) (end ("MancalaByScoreWhen" (no Moves Mover))) ) ) //------------------------------------------------------------------------------ (option "Play Rules" args:{ } { (item "First capture = 1" <1> <1> <> "The first capture must be of one counter." ) (item "First capture = 3, Second Capture = 1" <2> <3> <(and (= "NumCaptureDone" 1) (= (count at:(to)) 1))> "The first capture must be of three counters, the second of one counter." )* }) //------------------------------------------------------------------------------ (rulesets { (ruleset "Ruleset/Umuahia (Observed)" { "Play Rules/First capture = 3, Second Capture = 1" } ) (ruleset "Ruleset/Murray (Observed)" { "Play Rules/First capture = 1" } ) }) //------------------------------------------------------------------------------ (metadata (info { (description "Ako Okwe is a mancala-type board game documented in Nigeria during the twentieth century. The game is sometimes compared to marketing, and captures said to be placed in the nkuru (bank). The full name, in Umuahia, is Ezu Ahia Ako Okwe, which translates to \"buying market.\"") (aliases {"Ezu Ahia Ako Okwe" "Okwe" "Akwa Nsa" "Buying Market"}) (useFor "Ruleset/Murray (Observed)" (rules "The first capture must be of one counter.")) (useFor "Ruleset/Murray (Observed)" (source "Murray 1951: 192.")) (useFor "Ruleset/Murray (Observed)" (id "23")) (useFor "Ruleset/Umuahia (Observed)" (rules "Played on a board with two rows of five holes with store holes on either side. To start, ten counters are placed in each hole except the stores. Play begins from any of a player's holes, and sowing proceeds in either direction, at the player's choice. The first seed is sown in the hole from which play started. When the last counter of a sowing falls into a hole, making the contents of that hole odd (but not more than nine), the counters are captured. The first capture must be of three counters, the second of one counter.")) (useFor "Ruleset/Umuahia (Observed)" (source "Murray 1951: 192.")) (useFor "Ruleset/Umuahia (Observed)" (id "30")) (id "30") (version "1.3.12") (classification "board/sow/two rows") (credit "Eric Piette") (origin "This game was played in West Africa, around 1951.") } ) (graphics { (board Style Mancala) }) (ai "Ako Okwe_ai" ) )